<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    
    <body>
        
        <ui:composition template="./../Templates/Test.xhtml">
            
            

            <ui:define name="content">
               <fieldset style="height: 700px">
                    <legend><b>Reply Contact</b></legend>


                    <center> <table width="716" height="513">
                            <tr>
                                <td><h2>Reply</h2></td>
                            </tr>
                            <tr>
                                 <td height="47"><b>Reply with acount  : </b></td>
                                <td><h2>${sessionScope.userid}</h2></td>
                            </tr>
                            <tr>
                                <td height="47"><b>Your email : </b></td>
                                <td><p:inputText value="#{contactBean.fromMail}"/>@gmail.com</td>

                            </tr>
                            <tr>
                                <td height="47"><b>Password (of your e-mail) : </b></td>
                                <td><p:password value="#{contactBean.password}" feedback="true" minLength="6"/></td>

                            </tr>
                            <tr>
                                <td height="47"><b>Subject : </b></td>
                                <td><p:inputText value="#{contactBean.subject}"/></td>

                            </tr>
                            <tr>
                                <td>======================</td>
                                <td>=========================</td>

                            </tr>
                            
                            <tr>
                                <td height="47"><b>Sender : </b></td>
                                <td><p:inputText value="#{contactBean.selectedContact.firstName}"/></td>
                                
                            </tr>
                            
                            <tr>
                                <td height="47"><b>E-mail : </b></td>
                                <td><p:inputText value="#{contactBean.selectedContact.yourEmail}"/></td>

                            </tr>
                            <tr>
                                <td height="45"><b>Content : </b> </td>
                                <td><p:inputTextarea value="#{contactBean.selectedContact.message}" style="width: 500px; height: auto"/></td>
                                
                            </tr>

                            <tr>
                                <td height="45"><b>Reply : </b></td>
                                <td><p:editor value="#{contactBean.content}"/>  </td>
                                
                            </tr>
                           
                            <tr>
                                <td height="65"></td>
                                <td>
                                    <h:commandButton action="Contact" actionListener="#{contactBean.sendReplyContact}" value="Send"/>

                                    <h:commandButton value="Reset" type="reset"/>
                                </td>
                                <td></td>
                            </tr>
                        </table>
                    </center>

                </fieldset>
            </ui:define>

         

        </ui:composition>
        
    </body>
</html>
